﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Ferreteria.Forms.GenerarRemito;

namespace Ferreteria.Forms.GenerarRemito
{
    public partial class FrmModifCantRemito : Form
    {
        private int ID;
        private int saldo;

        public FrmModifCantRemito(int ID, int saldo,string ArtNombre)
        {
            InitializeComponent();
            this.ID = ID;
            this.saldo = saldo;
            NumUpDownCant.Maximum = saldo;
            NumUpDownCant.Minimum = 1;
            lblArtNombre.Text = ArtNombre;
         }

        private void btnAceptar_Click(object sender, EventArgs e)
        {
            FrmGenerarRemito.nuevacant = Convert.ToInt32(NumUpDownCant.Value);
            this.Close();
        }

       
        private void FrmModifCantRemito_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                e.Handled = true;
                this.btnAceptar_Click(sender, e);
            }
        }
    }
}
